package org.cocos2dx.lib;

import com.google.gson.JsonObject;
import com.papa91.activity.EmuBaseActivity;

import android.R.integer;
import android.webkit.JavascriptInterface;

public class WebJSPInterface {

	@JavascriptInterface
	public String getJaveScriptFace(String json)
	{
		String gameID = EmuBaseActivity.GameID;
		String userID = EmuBaseActivity.UserID;
		JsonObject m_json = new JsonObject();
		m_json.addProperty("game_id", Long.parseLong(gameID));
		m_json.addProperty("uid",  Long.parseLong(userID));
		m_json.addProperty("token", EmuBaseActivity.token);
		m_json.addProperty("ip", EmuBaseActivity.server_ip);
		//m_json.addProperty("ip", "127.0.0.1");
		return m_json.toString();
	}
}
